<!DOCTYPE html>
<html >
	<head>
		<meta charset="utf-8">
		<title>事件绑定</title>
	</head>
	<body>
		<div id="app" v-cloak @click="">
			用户名：<input type="text" v-model="hello" />
			<button type="button" @click="destroyed()"> 销毁</button>
		</div>
	</body>
</html>
<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript"> 

	var v=new Vue({
		el:"#app",
		data:{
			hello:""
		},
		methods:{
			destroyed(){
				this.$destroy();
			}
		},
		computed:{
			
		},
		watch:{
			
		},
		beforeCreate(){
			console.log("beforeCreate");
		},
		created(){
			console.log("created")
		},beforeUpdate(){
			console.log("数据更改浅")
		}
		,updated() {
			console.log("数据更新")
		},
		beforeDestroy() {
			console.log("销毁对象")
			
		}
		,
		destroyed() {
			console.log("销毁完成")
		}
		
	
	});
</script>
